<%@ Control Language="C#" AutoEventWireup="true" CodeFile="YCodeTransforms.ascx.cs" Inherits="forums_controls_administration_YCodeTransforms" %>
<asp:GridView runat="server" ID="gridItems" AutoGenerateColumns="false" Width="100%" ShowHeader="False">
    <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:LinkButton runat="server" ID="lnkUp"
                    Text="Up"
                    OnCommand="Move"
                    CommandArgument='<%# Eval("ID") %>'
                    CommandName="up" />
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Left" />
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <p>
                    Regex Pattern:<br />
                    <asp:TextBox runat="server" ID="txtPattern" TextMode="multiLine"
                        Rows="4" Columns="40" Text='<%# Eval("Pattern") %>' />
                </p>
                <p>
                    Regex Replacement:<br />
                    <asp:TextBox runat="server" ID="txtReplacement" TextMode="multiLine"
                        Rows="4" Columns="40" Text='<%# Eval("Replacement") %>' />
                </p>
                <p>
                    <asp:Button runat="server" ID="btnSave" Text="Save"
                        CommandArgument='<%# Eval("ID") %>'
                        OnCommand="SaveTransform"
                    />
                </p>
                <p>
                    <asp:LinkButton runat="server" ID="lnkDelete" Text="Delete"
                        CommandArgument='<%# Eval("ID") %>'
                        OnCommand="DeleteItem" />
                </p>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:LinkButton runat="server" ID="lnkDown"
                    Text="Down"
                    OnCommand="Move"
                    CommandArgument='<%# Eval("ID") %>'
                    CommandName="down" />
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Right" />
        </asp:TemplateField>
    </Columns>
    <AlternatingRowStyle BackColor="#EEEEEE" />
</asp:GridView>